
// import { getUserInfo } from "@/api/login"
const AccessTokenKey = 'ACCESS_TOKEN'
const CurrentUser = 'Current_User'

// ========== Token 相关 ==========

export function getAccessToken() {
  return localStorage.getItem(AccessTokenKey)
}


export function setToken(token) {
  localStorage.setItem(AccessTokenKey, token)
}

export function removeToken() {
  localStorage.removeItem(AccessTokenKey)
}

export function setCurrentUser(user){
    var strjsonData=JSON.stringify(user);

    localStorage.setItem(CurrentUser,strjsonData);

 
}
export function removeCurrentUser(){
  localStorage.removeItem(CurrentUser)
 
}
export function getCurrentUser(){
  let getLocalData=localStorage.getItem(CurrentUser);
  // let jsonObj=JSON.stringify(getLocalData);
  return getLocalData;
}